<%@ include file="/WEB-INF/jsp/header.jsp" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<h1>Upravte galerii (3/3)</h1>

<c:choose>
  	<c:when test="${empty photos}">
  		<p>V galerii nejsou zadne fotografie</p> 
  	</c:when>
  	<c:otherwise>
  		<c:forEach var="photo" items="${photos}">
  			<div class="snapshot">
				<div class="">
					<a href="<spring:url value="/gallery/finish/${gallery.id}/deletephoto/${photo.id}" htmlEscape="true" />" title="Odstranit">X</a>
				</div>
				<div class="photoThumbnail">
					<img src="${pageContext.request.contextPath}/uploaded/${photo.gallery.owner.userName}/${photo.gallery.rootFolder}/thumbnails/${photo.fileName}" height="100" title="${photo.description}"/>
				</div>
			</div>
		</c:forEach>
  	</c:otherwise>
</c:choose>
<a href="<spring:url value="/gallery/show/${gallery.id}" />">Dokončit</a>
<%@ include file="/WEB-INF/jsp/footer.jsp" %>